import Vue from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import './assets/element-variables.scss'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import axios from 'axios'
import SDialog from './views/common/Sdialog.vue'
import Footer from './views/common/Footer.vue'
import  Header from './views/common/Header.vue'
import '../src/assets/tailwind.css' // 引入tailwind
import VueClipboard from 'vue-clipboard2'
import 'url-search-params-polyfill'
import 'babel-polyfill'

import jquery from "jquery";
Vue.prototype.$ = jquery;

/* v-md-editor 编辑器 start  */
/* 1、v-md-editor 基础引用  */
import VueMarkdownEditor from '@kangc/v-md-editor';
import '@kangc/v-md-editor/lib/style/base-editor.css';
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
import '@kangc/v-md-editor/lib/theme/style/vuepress.css';
import Prism from 'prismjs';
VueMarkdownEditor.use(vuepressTheme, {
  Prism,
});

/* 2、v-md-editor 代码块关键字高亮  */
import githubTheme from '@kangc/v-md-editor/lib/theme/github.js';
import '@kangc/v-md-editor/lib/theme/style/github.css';
// 引入所有语言包
import hljs from 'highlight.js';
VueMarkdownEditor.use(githubTheme, {
  Hljs: hljs,
});
Vue.use(VueMarkdownEditor);

/* 3、v-md-editor 二次封装  */
// import mdEditor from '@/views/common/VmdEditor.vue';
// Vue.component('MdEditor', mdEditor);
/* v-md-editor 编辑器 end  */

import VMdPreviewHtml from '@kangc/v-md-editor/lib/preview-html';
import '@kangc/v-md-editor/lib/style/preview-html.css';

// 引入使用主题的样式
// import '@kangc/v-md-editor/lib/theme/style/vuepress';

Vue.use(VMdPreviewHtml);


Vue.prototype.$axios = axios

Vue.config.productionTip = false
Vue.component('Header',Header)
Vue.component('Footer',Footer)
Vue.use(ElementUI);
// 注册为全局组件
Vue.component('SDialog', SDialog)
Vue.use(VueClipboard)

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')




